#!/bin/bash

LOGFILE=flashback_db.txt
echo `date` "	flashback_db.sh is running"
export ORACLE_SID=CMTEST
export ORACLE_HOME=/u00/oracle/product/11.2.0.2
export PATH=$PATH:$ORACLE_HOME/bin
sqlplus -s '/ as sysdba' << EOF
shutdown immediate;
startup mount;
flashback database to restore point CM_RESTORE_POINT_1;
alter database open resetlogs;
exit
EOF
exit